package lanqiaotrain.t2;

import java.util.Scanner;

/**
 * @Author: Hasee
 * @Date: 2020-07-23 18:23:32
 */
public class Basic5 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        int[] numlist=new int[n];
        for (int i=0;i<n;i++){
            numlist[i]=scanner.nextInt();

        }
        int num=scanner.nextInt();

        int result=0;
        for (int i=0;i<n;i++) {
                if (num==numlist[i]){
                result=i+1;
                break;
            }
            if (i==n-1){
                result=-1;
            }
        }
        System.out.println(result);
    }
}
